<?php
// get the juicy part of the url
// ex: /index.php/class/function/id/ => array('class','function','id')
$GLOBALS['url'] = array();
$start = split("\?",$_SERVER['REQUEST_URI']);
$urlsplit = split("index.php",$start[0]);
if(count($urlsplit) == 2) { // if there is an 'index.php' in the url
  $urlsplit2 = split("/",$urlsplit[1]);
  foreach($urlsplit2 as $item) {
    if(!empty($item)) {
      array_push($url,urldecode($item));
    }
  }
} else { // root of app
  $url = array();
}
?>